package testDemo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 黎鹤舞
 * Date: 2023-11-18
 * Time: 19:36
 */
public class Duck extends Animal implements IRun,IFly,ISwim{
    public Duck(String name) {
        super(name);
    }

    @Override
    public void eat() {
        System.out.println(this.name + " 正在吃鸭食....");
    }

    @Override
    public void fly() {
        System.out.println(this.name+" 正在用翅膀滑行...");
    }

    @Override
    public void run() {
        System.out.println(this.name+" 正在用鸭掌跑....");
    }

    @Override
    public void swim() {

    }
}
